package digitaldreamers.games.ddmonsters.servers.gameserver.components;

import digitaldreamers.games.ddmonsters.servers.gameserver.components.basicinfomation.MonsterCardInformation;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * A normal monster card.
 * @author DaoLe
 */
public class MonsterCardComponent extends PlayerCardComponent {
    
    // <editor-fold defaultstate="collapsed" desc="Constants">
    
    // <editor-fold defaultstate="collapsed" desc="Database column names">
    public static final String MONSTER_EXP_COLUMN = "monster_exp";
    public static final String MONSTER_LEVEL_COLUMN = "monster_level";
    // </editor-fold>
    
    public static final int DEFAULT_MOVEMENT_RANGE = 1;
    
     // </editor-fold>
    
    private MonsterCardInformation m_MonsterCardInformation;
    private int m_iMonsterExp;
    private int m_iMonsterLevel;
    private int m_iDuelHP;
    private int m_iDuelAttackPoint;//The attack point of the monster card.
    private int m_iDuelDefensePoint;//The defense point of the monster card.
    private int m_iDuelMovementRange;
    private int m_iDuelAttackRange;
    private boolean m_bCanMove;
    
    public MonsterCardInformation getMonsterCardInformation() {
        return m_MonsterCardInformation;
    }
    
    public void setMonsterCardInformation(MonsterCardInformation monsterCardInformation) {
        m_MonsterCardInformation = monsterCardInformation;
    }
    
    public int getMonsterExp() {
        return m_iMonsterExp;
    }
    
    public void setMonsterExp(int iMonsterExp) {
        m_iMonsterExp = iMonsterExp;
    }
    
    public int getMonsterLevel() {
        return m_iMonsterLevel;
    }
    
    public void setMonsterLevel(int iMonsterLevel) {
        m_iMonsterLevel = iMonsterLevel;
    }
    
    public int getDuelHP() {
        return m_iDuelHP;
    }
    
    public void setDuelHP(int iDuelHP) {
        m_iDuelHP = iDuelHP;
    }
    
    /**
     * Get the attack point of the monster card.
     * @return The attack point of the monster card.
     */
    public int getDuelAttackPoint() {
        return m_iDuelAttackPoint;
    }
    
    public void setDuelAttackPoint(int iDuelAttackPoint) {
        m_iDuelAttackPoint = iDuelAttackPoint;
    }
    
    /**
     * Get the defense point of the monster card.
     * @return The defense point of the monster card.
     */
    public int getDefensePoint() {
        return m_iDuelDefensePoint;
    }
    
    public void setDefensePoint(int iDuelDefensePoint) {
        m_iDuelDefensePoint = iDuelDefensePoint;
    }
    
    public int getDuelMovementRange() {
        return m_iDuelMovementRange;
    }
    
    public void setDuelMovementRange(int iMovementRange) {
        m_iDuelMovementRange = iMovementRange;
    }
    
    public int getDuelAttackRange() {
        return m_iDuelAttackRange;
    }
    
    public void setDuelAttackRange(int iAttackRange) {
        m_iDuelAttackRange = iAttackRange;
    }
    
    public boolean getMovementState() {
        return m_bCanMove;
    }
    
    public void setMovementState(boolean bCanMove) {
        m_bCanMove = bCanMove;
    }
    
    public MonsterCardComponent(MonsterCardInformation monsterCardInformation, int iID, PlayerComponent owner, int iMonsterExp, int iMonsterLevel) throws IllegalArgumentException {
        super(monsterCardInformation, iID, owner);
        m_MonsterCardInformation = monsterCardInformation;
        m_iMonsterExp = iMonsterExp;
        m_iMonsterLevel = iMonsterLevel;
        m_iDuelHP = monsterCardInformation.getHP();
        m_iDuelMovementRange = DEFAULT_MOVEMENT_RANGE;
        m_bCanMove = true;
    }
}
